﻿using System.Collections.Generic;
using System.Text.RegularExpressions;
using DGMResourcesTool.Logic.Config;
using DGMResourcesTool.Logic.FileUtil;

namespace DGMResourcesTool.Logic
{
    public class ResFileInfo
    {
        /// <summary>
        /// 要查找的ab资源的路径.
        /// </summary>
        public string FullPath = "";
        /// <summary>
        /// 要查找的ab资源的名字.
        /// </summary>
        public string Name = "";
        /// <summary>
        /// 处理过的名字，比如去掉了末尾的 01，02等
        /// </summary>
        public string ProcessdName = "";
        /// <summary>
        /// 原始资源的绝对路径.
        /// </summary>
        public string SourceFullPath = string.Empty;
        /// <summary>
        /// ab资源的大小.
        /// </summary>
        public string Size = string.Empty;
        public void Init(string fullPath)
        {
            FullPath = fullPath;

            Name = System.IO.Path.GetFileNameWithoutExtension(fullPath)?.ToLower();
            Name = SuffixConfigUtility.DeleteSuffix(Name);
            ProcessdName = RegexConfigUtility.DeleteRegex(Name);
        }
    }
}